package com.hunan.api.catv.entity.enums;

/**
 * @author jiang zhuan
 * @version 1.0
 * @description 描述
 * @date 2021/11/25 0025
 * @package com.hunan.api.catv.entity.enums
 * @company 湖南有线
 */
public enum SmartFamilyInfoTypeEnum {

    shareHome(0, "shareHome"), shareDevice(1, "shareDevice"), alarm(2, "alarm");

    private final Integer type;

    private final String name;

    SmartFamilyInfoTypeEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static String getName(Integer type) {
        SmartFamilyInfoTypeEnum[] sfis = SmartFamilyInfoTypeEnum.values();
        for (SmartFamilyInfoTypeEnum sfi : sfis) {
            if (sfi.getType().equals(type)) {
                return sfi.getName();
            }
        }
        return null;
    }
}
